<script type="text/javascript" src="<?=userassets?>core_js/pay_pass.js"></script>
<body>
<?=pay_passtemplate()?>
   <div class="container-fluid p-t-15">
        <div class="row">
           <div class="col-lg-12">
            <div class="card">
                <div class="card-body">
                    <div class="panel-heading"><h3 class="panel-title"><?=$title?></h3></div>         
                        <div class="panel panel-primary">
                            <div class="panel-body">
                                <form action="./" method="GET" class="form-inline">
                                 <input type="hidden" name="s" value="order">
                                 <input type="hidden" name="my" value="search">
                                 <div class="form-group">
                                    <label>搜索</label>&nbsp;
                                    <select name="column" class="form-control">
                                        <option value="out_trade_no">商户订单</option>
                                        <option value="qr_id">二维码ID</option>
                                        <option value="trade_no">订单号</option>
                                        <option value="name">商品名称</option>
                                        <option value="money">金额</option>
                                        <option value="type">支付方式</option>
                                    </select>&nbsp;
                                 <div class="form-group">
                                     <input type="text" class="form-control" name="value" placeholder="搜索内容">
                                 </div>&nbsp; &nbsp;
                                 <button type="submit" class="btn btn-primary">搜索</button>&nbsp;&nbsp;
                                 <a href="javascript:location.reload();" class="btn btn-primary">刷新</a>
                                 </form>  
                                </div>
                               </div>  
                            </div>
                            <div class="panel">
                                <div class="table-responsive">
                                    <?=$con?>
                                <table class="table table-striped table-bordered table-vcenter">
                                    <thead>
                                        <tr>
                                            <th>交易号/商户订单号</th>
                                            <th>商品名称</th>
                                            <th>商品金额/浮动金额</th>
                                            <th>二维码ID/二维码备注</th>
                                            <th>支付方式/支付状态</th>
                                            <th>创建时间/完成时间</th>
                                            <th>操作</th>
                                        </tr>
                                    </thead>
                                    <tbody>
                                        <?php 
                                        foreach ($result as $res){
                                            $sql = "SELECT * FROM `pay_qrlist` WHERE `pid`='{$userrow['pid']}' and `id`='{$res['qr_id']}' limit 1";
                                            $row = executeSQLQuery($sql);
                                            $rowData = [
                                                ['label' => $res['trade_no'],'value' => $res['out_trade_no']],
                                                ['label' => $res['name']],
                                                ['label' => $res['money'],'value' => $res['price']],
                                                ['label' => generateTableRowWithFunction($row,$res)],
                                                ['label' => '<img src="/Core/assets/icon/'.$res['type'].'.ico" width="16" onerror="this.style.display=\'none\'">'.pay_type($res['type']),'value' => order_zt($res['status'])],
                                                ['label' => $res['addtime'],'value' => $res['endtime']],
                                                ['label' => '<a onclick="Notify(\''.$res['trade_no'].'\')" class="btn btn-danger btn-xs">补单回调</a>'], // 注意此行的修改
                                            ];
                                            $html .= Splicing_form($rowData);
                                        }
                                        echo $html;
                                        table_page($page,$pages,'order')
                                        ?>
                                    </div>
                                </div>
                             </div>   
                          </div>      
                      </div>          
                   </div>
              </div>     
</body>

<script type="text/javascript" src="<?=userassets?>core_js/order.js"></script>